package java67_15;

public class OldDriver {
	// 姓名
	private String name;

	public OldDriver(String n) {
		name = n;
	}

	// 不建议
//	public int OldDriver() {
//		return 1;
//	}

	public void drive(Car c) {
		System.out.println(name + "开着" + c.getBrand() + " " + c.getNo() + " 在外面浪");
	}

	public void drive(Bus b) {
		System.out.println(name + "开着" + b.getLine() + "路公交车,正点发车,到站停车");
	}

	public void drive(Train t) {
		System.out.println(name + "开着火车 :" + t.getLine());
		System.out.println("从" + t.getFrom() + "到" + t.getTo());
	}
}
